package removeTypeSettingCode;

public abstract class Employee extends Human{

	public static Employee createEmployee(int type, int comission, int bonus) {
		return null;
	}

	public static Employee createEmployee(int type) {
		return null;
	}

	public static Employee createEmployee(int comission, int bonus) {
		return null;
	}

	protected final int _type;

	private int _monthlySalary;
	private int _commission;
	private int _bonus;
	public static final int ENGINEER = 0;
	public static final int SALESMAN = 1;
	public static final int MANAGER = 2;

	public Employee (int type, int comission, int bonus) {
		super("NONE");
		_type = type;
		_commission = comission;
		_bonus = bonus;
	}
	
	public Employee (int type) {
		this(type, 0, 0);
	}
	
	public Employee (int comission, int bonus) {
		super("NONE");
		_type = ENGINEER;
		_commission = comission;
		_bonus = bonus;
	}
	
	
	public int payAmount() {
        switch (get_type()) {
            case Employee.ENGINEER:
               return _monthlySalary;
            case Employee.SALESMAN:
               return _monthlySalary + _commission;
            case Employee.MANAGER:
               return _monthlySalary + _bonus;
            default:
               throw new RuntimeException("Incorrect Employee");
        }
    }
	
	public String printFlyer() {
        switch (get_type()) {
            case Employee.ENGINEER:
               return get_type()+":"+_monthlySalary;
            case Employee.SALESMAN:
               return get_type()+":"+(_monthlySalary + _commission);
            case Employee.MANAGER:
               return get_type()+":"+(_monthlySalary + _bonus);
            default:
               throw new RuntimeException("Incorrect Employee");
        }
    }
	
	public abstract int get_type();
}
